function instanceof1(ins, B) {
  const assert = (condition, msg) => {
    if (!condition) {
      throw new Error(msg)
    }
  }
  assert(ins && typeof ins == 'object', 'must be an object')
  let isFind = false
  while (ins && !isFind) {
    if (ins.constructor === B) {
      isFind = true
    } else {
      ins = ins.__proto__
    }
  }
  return isFind
}
